package com.learn.designPatterns.behavioral.vistor;

import java.util.ArrayList;
import java.util.List;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-26 15:22
 */
public class CustomerGroup {

    private List<Customer> customers = new ArrayList<>();

    public void accept(Vistor vistor) {
        for (Customer customer : customers) {
            customer.accept(vistor);
        }
    }

    public void addCustomer(Customer customer) {
        customers.add(customer);
    }
}
